package com.lzy.cloud.job.constants;

public class CommonConstants {

    /** 任务状态 */
    public enum JobStatusEnum {
        OFF(0, "禁用"), ON(1, "启用");

        private JobStatusEnum(Integer k, String v) {
            this.k = k;
            this.v = v;
        }

        private Integer k;
        private String v;

        public Integer getK() {
            return k;
        }

        public void setK(Integer k) {
            this.k = k;
        }

        public String getV() {
            return v;
        }

        public void setV(String v) {
            this.v = v;
        }

        /**
         * 获取v
         *
         * @param type
         * @param status
         * @return
         */
        public static String getV(Integer type) {
            for (JobStatusEnum c : JobStatusEnum.values()) {
                if (c.getK().equals(type)) {
                    return c.getV();
                }
            }
            return "";
        }

    }
}
